package com.quick.admin.service;

import com.quick.admin.mapper.RoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author ：chicunxiang
 * @date ：Created in 2021/1/27 14:04
 * @description：
 * @version: 1.0
 */
@Service
public class RoleService {


    @Autowired
    private RoleMapper mRoleMapper;

    public Set<String> queryByIds(List<String> roleIdList) {
        Set<String> roles = new HashSet<>();
        if (roleIdList.size() == 0) {
            return roles;
        }

        List<String> userRoldNames = mRoleMapper.selectUserRoldNameById(roleIdList);

        roles.addAll(userRoldNames);

        return roles;
    }
}
